package xinxin.com.ObserverPattern.Observer;

import xinxin.com.ObserverPattern.Subject.Subject;

public abstract class Observer {
    protected String name;
    protected Subject sub;          // 观察者所绑定的通知者

    public Observer(String name, Subject sub) {
        this.name = name;
        this.sub = sub;
    }

    public abstract void Update();  // 更新行为
}
